home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / turbotut.arc / REALMATH.PAS < prev    next >
Pascal/Delphi Source File  |  1989-06-30  |  889b  |  23 lines

  1. PROGRAM real_math_demo;
  2.  
  3. VAR a,b,c,d : REAL;
  4.  
  5. BEGIN
  6.   a := 3.234;               {simply assigning a value}
  7.   b := a + 1.101;           {adding a constant}
  8.   c := a + b;               {summing two variables}
  9.   d := 4.234*a*b;           {multiplication}
  10.   d := 2.3/b;               {division}
  11.   d := a - b;               {subtraction}
  12.   d := (a + b)/(12.56-b);   {example of a multiple expression}
  13.                             {Pascal has no expression for
  14.                              raising a number to a power.
  15.                              It must be done with the log and
  16.                              exp functions}
  17.   {The trigonometric functions, log functions and others are available
  18.    as predefined routines. See pages 139 to 141 of the TURBO reference
  19.    manual for a complete list}
  20.  
  21.   { It will be left up to you to print out some of the above values}
  22. END.
  23.